/*
 * 
 */

package com.spartancoder.accommodation.beans;

import com.spartancoder.accommodation.models.Place;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;

/**
 *
 * @author andrei
 */
public class OptionBean {
	private int optionId, sessionId, studentId, placeId, statusId;
	private int room;
	private String comment;
	private Timestamp addDate;

	public void fill(ResultSet rs) throws SQLException {
		setOptionId(rs.getInt("option_id"));
		setSessionId(rs.getInt("session_id"));
		setStudentId(rs.getInt("student_id"));
		setPlaceId(rs.getInt("place_id"));
		setStatusId(rs.getInt("status_id"));
		setRoom(rs.getInt("room"));
		setComment(rs.getString("comment"));
		setAddDate(rs.getTimestamp("add_date"));
	}

	public Timestamp getAddDate() {
		return addDate;
	}

	public void setAddDate(Timestamp addDate) {
		this.addDate = addDate;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public int getOptionId() {
		return optionId;
	}

	public void setOptionId(int optionId) {
		this.optionId = optionId;
	}

	public int getPlaceId() {
		return placeId;
	}

	public PlaceBean getPlace() {
		return Place.fetch(getPlaceId());
	}

	public void setPlaceId(int placeId) {
		this.placeId = placeId;
	}

	public int getRoom() {
		return room;
	}

	public void setRoom(int room) {
		this.room = room;
	}

	public int getSessionId() {
		return sessionId;
	}

	public void setSessionId(int sessionId) {
		this.sessionId = sessionId;
	}

	public int getStatusId() {
		return statusId;
	}

	public void setStatusId(int statusId) {
		this.statusId = statusId;
	}

	public int getStudentId() {
		return studentId;
	}

	public void setStudentId(int studentId) {
		this.studentId = studentId;
	}
}
